#lang sicp

;; require `The-Fermat-Test.rkt`

(define (check-Carmichael n)
  (define (check a)
    (= (expmod a n n) a))
  (define (iter a)
    (cond ((= a n) #t)
          ((check a) (iter (+ a 1)))
          (else #f)))
  (iter 1))
